package cn.tedu.charging.device.service;

import cn.tedu.charging.device.dao.repository.GunRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GunService {
    @Autowired
    private GunRepository gunRepository;
    public Boolean checkGun(Integer gunId) {
        Integer result = gunRepository.countByIdAndStatus(gunId, 1);
        return result > 0;
    }
}
